package com.castle.fortress.admin.orders.mapper;

import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.castle.fortress.admin.orders.entity.SaleCouponEntity;
import java.util.Map;
import java.util.List;
/**
 * 优惠券Mapper 接口
 *
 * @author whc
 * @since 2023-01-05
 */
public interface SaleCouponMapper extends BaseMapper<SaleCouponEntity> {

    /**
    * 扩展信息列表
    * @param pageMap
    * @param saleCouponEntity
    * @return
    */
    List<SaleCouponEntity> extendsList(@Param("map")Map<String, Long> pageMap, @Param("saleCouponEntity") SaleCouponEntity saleCouponEntity);

    /**
    * 扩展信息记录总数
    * @param saleCouponEntity
    * @return
    */
    Long extendsCount(@Param("saleCouponEntity") SaleCouponEntity saleCouponEntity);

    /**
    * 优惠券扩展详情
    * @param id 优惠券id
    * @return
    */
    SaleCouponEntity getByIdExtends(@Param("id")Long id);


    /**
     * 查询换入id 可领取的优惠券 领券中心 接口
     * @param levelId
     * @return
     */
    List<SaleCouponEntity> getMemberAvailCoupon(@Param("levelId") Long levelId);
}
